﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Collections.Generic;
namespace Exact_VAS
{
    public partial class PaymentVoucherRpt : DevExpress.XtraReports.UI.XtraReport
    {
        public PaymentVoucherRpt()
        {
            InitializeComponent();
        }

        private void PaymentVoucherRpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            List<PaymentVoucherEntity> ListPayment = new List<PaymentVoucherEntity>();   
            Common common = new Common();
            for (double i = 1; i <= 4; i++)
            {
                PaymentVoucherEntity item = new PaymentVoucherEntity();
                item.Address = "TEST";
                item.Amount = 100000;
              //  item.AmountByWord = common.DocTienBangChu(100000, " đồng");
                item.AmountDetail = item.Amount.Value * 0.25;
                item.CompanyName = "TEST";
                item.Content = "TEST";
                item.Dept = "TEST";
                item.DeptAddress = "TEST";
                item.GLAccountNumber = "60000" + i.ToString();
                item.Receiver = "TAN";
                item.RefNo = "00001";
                item.VoucherDate = DateTime.Now.Date;
                item.VoucherNo = "200.10000";
                ListPayment.Add(item);
            }
            this.bindingSource1.DataSource = ListPayment;
        }

    }
}
